package com.gaswell.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.gaswell.entity.Qba01;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gaswell.vo.Qba01Vo;
import com.gaswell.vo.Result;
import org.apache.ibatis.session.ResultHandler;

import java.sql.Date;
import java.sql.Timestamp;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 采气井日数据 服务类
 * </p>
 *
 * @author Lei Wang
 * @since 2022-05-24
 */
public interface IQba01Service extends IService<Qba01> {


    Map selectByMutliProperties(String start, String end, String type, String jh, int sort,
                                int current, int size, Integer sfsjh,
                                String token, List<String> ywbhs,
                                List<String> zwbhs);

    IPage getByPropertiesDirectSingleThread(Timestamp start, String end, String type, String jh, int sort,
                                            int current, int size, Integer sfsjh,
                                            String token, List<String> ywbhs,
                                            List<String> zwbhs);


    List selectDuringTimeMultiThread(List<String> ywbhs, List<String> zwbhs);


    Result insertOne(Qba01 qba01);

    Result updateOne(Qba01 qba01);

    Result selectProperties(Qba01 qba01, int sort, int departnent, String start, String end);

    Result selectAll(int current, int size, String jh, int sort);

    Qba01 selectLastOne();

    Qba01 setByDate(String s, String jh);

    /**
     * 获取最新的数据
     *
     * @param jh
     * @return
     */
    Qba01 setByDateLast(String jh);

    /**
     * \
     * 查询日数据中的最新数据
     *
     * @return
     */
    Qba01 getByDateLast(String ywbh, String zwbh);

    /**
     * 根据jhs列表查询最新的日数据
     *
     * @param zwbhs ywbhs
     * @return
     */
    List<Qba01> GetByDateLast(List<String> zwbhs, List<String> ywbhs);

    void streamQuery(String sql, ResultHandler<Qba01> handler);

    Result selectByMutiProperties(Qba01Vo qba01Vo, String date, int sort, int department);

    Result pageByMutiProperties(Qba01Vo qba01Vo, String date, int sort, int department, int current, int size);

    Result findQm();

    Result findZm();

    Result findDm();

    Result findZyq();

    Result findQkmc();


}
